var uaParser = require('ua-parser-js');

module.exports = {
	getUA: function (input) {
		return uaParser(input);
	},
	sort: function (arr, predicate) {
		if (typeof predicate === 'string') { return arr; }

		return Array.prototype.sort.call(arr, predicate);
	},
	formatDate: function () {
		return 'todo';
	},
	fromJson: JSON.parse,
	forEach: function (arr, predicate, context) {
		return require('lodash.foreach')(arr, predicate.bind(context));
	},
	extend: require('lodash.assignin'),
	isNumber: Number.isFinite,
	isArray: require('lodash.isarray'),
	copyArray: function (arr) {
		return arr.slice(0);
	}
};
